package agents.client;

import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JOptionPane;
import javax.swing.text.DefaultCaret;
import org.joda.time.DateTime;

/**
 * This class represents the ClientAgent's Graphic User Interface.
 * @author Group 6
 */
public class ClientAgentGUI extends javax.swing.JFrame {

    private ClientAgent clientAgent;
    
    public ClientAgentGUI(ClientAgent clientAgent) {
        initComponents();
        // Guarda referência para a classe ClientAgent
        this.clientAgent = clientAgent;
        // Define funcionamento do log
        DefaultCaret caret = (DefaultCaret) this.jTextArea1_log.getCaret();
        caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
        // Define o título da JFrame
        this.setTitle("Client | " + clientAgent.getLocalName());
        // Define outras propriedades dos elementos da GUI
        this.disableUserInput();
        // Apresenta a JFrame
        this.showGui();
    }
    
    private void showGui() {
        pack();
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        int centerX = (int) screenSize.getWidth() / 2;
        int centerY = (int) screenSize.getHeight() / 2;
        setLocation(centerX - getWidth() / 2, centerY - getHeight() / 2);
        super.setVisible(true);
    }
    
    public void appendInfoToClientLog(String newInfo) {
        DateTime now = new DateTime();
        String time = Integer.toString(now.getYear())
                + "/"
                + Integer.toString(now.getMonthOfYear())
                + "/"
                + Integer.toString(now.getDayOfMonth())
                + " - "
                + Integer.toString(now.getHourOfDay())
                + ":"
                + Integer.toString(now.getMinuteOfHour())
                + ":"
                + Integer.toString(now.getSecondOfMinute());
        String text = time + "\n\t" +  newInfo + "\n";
        this.jTextArea1_log.append(text);
    }
    
    public void disableUserInput() {
        this.jButton1_addOrder.setEnabled(false);
        this.jTextField0_maxPrice.setEditable(false);
        this.jTextField0_minPrice.setEditable(false);
        this.jTextField1_productQty.setEditable(false);
        this.jTextField2_year.setEditable(false);
        this.jTextField3_month.setEditable(false);
        this.jTextField4_day.setEditable(false);
        this.jTextField5_hour.setEditable(false);
        this.jTextField6_minute.setEditable(false);
    }
    
    public void enableUserInput() {
        this.jButton1_addOrder.setEnabled(true);
        this.jButton1_addOrder.setText("Add Order");
        this.jTextField0_maxPrice.setEditable(true);
        this.jTextField0_minPrice.setEditable(true);
        this.jTextField1_productQty.setEditable(true);
        this.jTextField2_year.setEditable(true);
        this.jTextField3_month.setEditable(true);
        this.jTextField4_day.setEditable(true);
        this.jTextField5_hour.setEditable(true);
        this.jTextField6_minute.setEditable(true);
        this.jTextField6_minute.setEditable(true);
    }
    
    public void setClientStatus(String status) {
        this.jLabel15_clientStatus.setText(status);
    }
    
    public void setOrderDefined(boolean defined, int qty, DateTime deadline) {
        if (defined) {
            this.jLabel2_orderDefined.setText("Yes");
            this.jTextField0_minPrice.setText("");
            this.jTextField0_maxPrice.setText("");
            this.jTextField1_productQty.setText(Integer.toString(qty));
            this.jTextField2_year.setText(Integer.toString(deadline.getYear()));
            this.jTextField3_month.setText(Integer.toString(deadline.getMonthOfYear()));
            this.jTextField4_day.setText(Integer.toString(deadline.getDayOfMonth()));
            this.jTextField5_hour.setText(Integer.toString(deadline.getHourOfDay()));
            this.jTextField6_minute.setText(Integer.toString(deadline.getMinuteOfHour()));
            //this.jButton1_addOrder.setVisible(false);
        } else {
            this.jLabel2_orderDefined.setText("No");
            this.jTextField0_minPrice.setText("");
            this.jTextField0_maxPrice.setText("");
            this.jTextField1_productQty.setText("");
            this.jTextField2_year.setText("");
            this.jTextField3_month.setText("");
            this.jTextField4_day.setText("");
            this.jTextField5_hour.setText("");
            this.jTextField6_minute.setText("");
            this.jButton1_addOrder.setText("Add Order");
            this.jButton1_addOrder.setVisible(true);
        }
    }
    
    public void setOrderStatus(String status, int done, String obs) {
        if (status.equalsIgnoreCase("N/A")) {
            this.jLabel14_orderStatus.setText(status);
            this.jLabel15_orderDone.setText(status);
            this.jLabel17_orderOBS.setText(status);
        } else if (status.equalsIgnoreCase("Pending") || status.equalsIgnoreCase("Finished")) {
            this.jLabel14_orderStatus.setText(status);
            this.jLabel15_orderDone.setText(done + "%");
            this.jLabel17_orderOBS.setText(obs);
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2_orderDefined = new javax.swing.JLabel();
        jScrollPane1_log = new javax.swing.JScrollPane();
        jTextArea1_log = new javax.swing.JTextArea();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jTextField1_productQty = new javax.swing.JTextField();
        jTextField2_year = new javax.swing.JTextField();
        jTextField3_month = new javax.swing.JTextField();
        jTextField4_day = new javax.swing.JTextField();
        jTextField5_hour = new javax.swing.JTextField();
        jTextField6_minute = new javax.swing.JTextField();
        jButton1_addOrder = new javax.swing.JButton();
        jLabel10 = new javax.swing.JLabel();
        jTextField0_maxPrice = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jTextField0_minPrice = new javax.swing.JTextField();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14_orderStatus = new javax.swing.JLabel();
        jLabel15_orderDone = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17_orderOBS = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15_clientStatus = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        jSeparator3 = new javax.swing.JSeparator();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setResizable(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N
        jLabel1.setText("OrderDefined:");

        jLabel2_orderDefined.setText("N/A");

        jTextArea1_log.setEditable(false);
        jTextArea1_log.setColumns(20);
        jTextArea1_log.setRows(5);
        jScrollPane1_log.setViewportView(jTextArea1_log);

        jLabel2.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N
        jLabel2.setText("Log:");

        jLabel3.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        jLabel3.setText("Qty:");

        jLabel4.setText("M:");

        jLabel5.setText("H:");

        jLabel6.setText("Y:");

        jLabel7.setText("M:");

        jLabel8.setText("D:");

        jLabel9.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        jLabel9.setText("Deadline:");

        jTextField1_productQty.setEditable(false);
        jTextField1_productQty.setNextFocusableComponent(jTextField2_year);

        jTextField2_year.setEditable(false);
        jTextField2_year.setNextFocusableComponent(jTextField3_month);

        jTextField3_month.setEditable(false);
        jTextField3_month.setNextFocusableComponent(jTextField4_day);

        jTextField4_day.setEditable(false);
        jTextField4_day.setNextFocusableComponent(jTextField5_hour);

        jTextField5_hour.setEditable(false);
        jTextField5_hour.setNextFocusableComponent(jTextField6_minute);

        jTextField6_minute.setEditable(false);
        jTextField6_minute.setNextFocusableComponent(jButton1_addOrder);

        jButton1_addOrder.setText("Add Order");
        jButton1_addOrder.setEnabled(false);
        jButton1_addOrder.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1_addOrderActionPerformed(evt);
            }
        });

        jLabel10.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        jLabel10.setText("Min/Max Price:");

        jTextField0_maxPrice.setEditable(false);
        jTextField0_maxPrice.setNextFocusableComponent(jTextField1_productQty);

        jLabel11.setText("/");

        jTextField0_minPrice.setEditable(false);

        jLabel12.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N
        jLabel12.setText("OrderStatus:");

        jLabel13.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        jLabel13.setText("Done:");

        jLabel14_orderStatus.setText("N/A");

        jLabel15_orderDone.setText("N/A");

        jLabel16.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        jLabel16.setText("Obs:");

        jLabel17_orderOBS.setText("N/A");

        jLabel14.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N
        jLabel14.setText("Client Status:");

        jLabel15_clientStatus.setText("N/A");

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jSeparator3)
                    .add(jSeparator2)
                    .add(jSeparator1)
                    .add(layout.createSequentialGroup()
                        .add(84, 84, 84)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, jButton1_addOrder, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                                .add(jLabel9)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 47, Short.MAX_VALUE)
                                .add(jLabel6)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTextField2_year, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 51, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jLabel7)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTextField3_month, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jLabel8)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTextField4_day, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jLabel5)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTextField5_hour, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jLabel4)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTextField6_minute, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(layout.createSequentialGroup()
                                .add(jLabel10)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTextField0_minPrice, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 80, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jLabel11)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTextField0_maxPrice, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 80, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(3, 3, 3)
                                .add(jLabel3)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTextField1_productQty))))
                    .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(layout.createSequentialGroup()
                                .add(jLabel1)
                                .add(18, 18, 18)
                                .add(jLabel2_orderDefined))
                            .add(layout.createSequentialGroup()
                                .add(jLabel12)
                                .add(26, 26, 26)
                                .add(jLabel14_orderStatus))
                            .add(layout.createSequentialGroup()
                                .add(85, 85, 85)
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(jLabel13)
                                    .add(jLabel16))
                                .add(18, 18, 18)
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(jLabel17_orderOBS)
                                    .add(jLabel15_orderDone)))
                            .add(jLabel2)
                            .add(layout.createSequentialGroup()
                                .add(jLabel14)
                                .add(18, 18, 18)
                                .add(jLabel15_clientStatus)))
                        .add(0, 0, Short.MAX_VALUE))
                    .add(layout.createSequentialGroup()
                        .add(6, 6, 6)
                        .add(jScrollPane1_log)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel14)
                    .add(jLabel15_clientStatus))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jSeparator2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel1)
                    .add(jLabel2_orderDefined))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel10)
                    .add(jTextField0_maxPrice, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel3)
                    .add(jTextField1_productQty, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel11)
                    .add(jTextField0_minPrice, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel9)
                    .add(jLabel6)
                    .add(jTextField2_year, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel7)
                    .add(jTextField3_month, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel8)
                    .add(jTextField4_day, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel5)
                    .add(jTextField5_hour, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel4)
                    .add(jTextField6_minute, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButton1_addOrder)
                .add(1, 1, 1)
                .add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel12)
                    .add(jLabel14_orderStatus))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel13)
                    .add(jLabel15_orderDone))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel16)
                    .add(jLabel17_orderOBS))
                .add(3, 3, 3)
                .add(jSeparator3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel2)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jScrollPane1_log, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 109, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1_addOrderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1_addOrderActionPerformed
        boolean orderSent = false;
        try {
            if (Integer.parseInt(jTextField0_minPrice.getText()) < 90) {
                throw new Exception("Minimum Price should be higher or equal than 90!");
            }
            if (Integer.parseInt(jTextField0_maxPrice.getText()) < 91) {
                throw new Exception("Maximum Price should be higher or equal than 91!");
            }
            if (Integer.parseInt(jTextField0_minPrice.getText()) >= Integer.parseInt(jTextField0_maxPrice.getText())) {
                int maxPrice = Integer.parseInt(jTextField0_minPrice.getText()) + 1;
                this.jTextField0_maxPrice.setText(Integer.toString(maxPrice));
                throw new Exception("Minimum Price can't be lower or equal than Maximum!");
            }
            if (Integer.parseInt(jTextField1_productQty.getText()) < 1) {
                throw new Exception("Can't add negative or zero quantity!");
            }
            DateTime deadline = new DateTime(
                    Integer.parseInt(jTextField2_year.getText()),
                    Integer.parseInt(jTextField3_month.getText()),
                    Integer.parseInt(jTextField4_day.getText()),
                    Integer.parseInt(jTextField5_hour.getText()),
                    Integer.parseInt(jTextField6_minute.getText()));
            orderSent = clientAgent.updateOrder(
                    Integer.parseInt(jTextField0_minPrice.getText()),
                    Integer.parseInt(jTextField0_maxPrice.getText()),
                    Integer.parseInt(jTextField1_productQty.getText()),
                    deadline);
        } catch (IllegalArgumentException ex) {
            JOptionPane.showMessageDialog(
                    ClientAgentGUI.this,
                    "Invalid field values. " + ex.getMessage(),
                    "Error",
                    JOptionPane.ERROR_MESSAGE);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(
                    ClientAgentGUI.this,
                    "Invalid values. " + ex.getMessage(),
                    "Error",
                    JOptionPane.ERROR_MESSAGE);
        }
        if (orderSent) {
            jLabel2_orderDefined.setText("Yes");
            this.disableUserInput();
            jButton1_addOrder.setText("Added!");
        }
    }//GEN-LAST:event_jButton1_addOrderActionPerformed

    private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
        this.clientAgent.shutdownAgentAndGUI();
    }//GEN-LAST:event_formWindowClosing

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1_addOrder;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel14_orderStatus;
    private javax.swing.JLabel jLabel15_clientStatus;
    private javax.swing.JLabel jLabel15_orderDone;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17_orderOBS;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel2_orderDefined;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1_log;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JTextArea jTextArea1_log;
    private javax.swing.JTextField jTextField0_maxPrice;
    private javax.swing.JTextField jTextField0_minPrice;
    private javax.swing.JTextField jTextField1_productQty;
    private javax.swing.JTextField jTextField2_year;
    private javax.swing.JTextField jTextField3_month;
    private javax.swing.JTextField jTextField4_day;
    private javax.swing.JTextField jTextField5_hour;
    private javax.swing.JTextField jTextField6_minute;
    // End of variables declaration//GEN-END:variables
}
